package 力扣日常刷题.木23一月.第02天302;

import java.util.HashSet;
import java.util.Scanner;

/**
 * @author 帅小伙
 * @date 2022/3/2
 * @description
 */
public class Demo20小团的选调计划 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        HashSet<Integer> set = new HashSet<>();
        int n = sc.nextInt();
        int[] ans = new int[n];
        for (int i = 0; i < n; i++) {
            int t = -1;
            for (int j = 0; j < n; j++) {
                int nextInt = sc.nextInt();
                if(!set.contains(nextInt)&&t == -1){
                    t = nextInt;
                    set.add(t);
                }
            }
            ans[i] = t;
        }

        for (int i = 0; i < n; i++) {
            System.out.print(ans[i]+" ");
        }

    }
}
